using UnityGameFramework.Runtime;
using UnityEngine;
namespace Local
{
    public class HotUpdateComponent : GameFrameworkComponent
    {
        //热更入口预制体挂载位置
        [SerializeField]
        public GameObject m_InstanceRoot;
        public GameObject InstanceRoot => m_InstanceRoot;
        /// <summary>
        /// DLLs信息资源名称
        /// </summary>
        [SerializeField]
        [HideInInspector]
        private string m_DLLAssetsInfoAssetName = "Assets/HotUpdate/DLLs/Infos.json";
        public string DLLAssetsInfoAssetName => m_DLLAssetsInfoAssetName;
        //热更部分入口预制体
        [SerializeField]
        private string m_HotUpdateEntryPrefabAssetName = "Assets/HotUpdate/HotUpdateEntry.prefab";

        public string HotUpdateEntryPrefabAssetName => m_HotUpdateEntryPrefabAssetName;
        /// <summary>
        /// 异步加载AOT元数据
        /// </summary>
        [SerializeField]
        private bool m_LoadAOTMetaDllAsync = false;
        public bool LoadAOTMetaDllAsync => m_LoadAOTMetaDllAsync;


        protected override void Awake()
        {
            base.Awake();
            if (InstanceRoot == null)
            {
                m_InstanceRoot = new GameObject("Instance Root");
                InstanceRoot.transform.parent = transform;
            }
        }
    }

}